<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/jsp/comm_css_include.jsp"%>
<!doctype html>
<html>
<head>
<style type="text/css">
	#tabb {
    overflow: hidden;
    zoom: 1;
    border-bottom: 1px solid #e7eaec;
    border-top: 1px solid #e7eaec;
    height: 44px;
}

</style>
</head>
<body class="gray-bg">
	<!-- 隐藏域 -->
	<input type="hidden" id="openCardSubId"/>
	<input type="hidden" id="openCardId"/>
	
	<div class="container creditbody">
		<div class="iboxtitle">
			<span><i class="glyphicon glyphicon-map-marker"></i>&nbsp;贷中业务>贷中信息登记>银行放款</span>
			<a href="javascript:void(0)"></a>
		</div>
		<div class="ibox-content ibox-con">
			<%@include file="/jsp/auto_yw_info_include.jsp"%>
			<div id="outerb">
			<ul id="tabb">
				<li class="currentb">卡片信息</li>
				<li>基本信息</li>
				<li>单位信息</li>
				<li>联系人信息</li>
				<li>其他信息</li>
				<li>贷款信息</li>
			</ul>
			<div id="contentb">
				<ul class="ul-style"  style="display: block;">
						<div class="business-man">卡片信息</div>
						<div class="business-padding">
							<table cellpadding="0" cellspacing="0" border="0" class="infor-table">
								<tr>	
									<td align="right">
										<label class="control-label np">发证机关：</label>
									</td>
									<td colspan="3">
										<div class="control-div" id="authref"></div>
									</td>
								</tr>
								<tr>		
									<td align="right">
										<label class="control-label np">主卡发送移动电话：</label>
									</td>
									<td>
										<div class="control-div np" id="maMobile"></div>
									</td>
									
									<td align="right">
										<label class="control-label np">发送短信帐单手机号码：</label>
									</td>
									<td>
										<div class="control-div" id="smsPhone"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">卡片领取方式：</label>
									</td>
									<td>
										<div class="control-div" id="drawMode"></div>
									</td>
									<td align="right">
										<label class="control-label np">对帐单寄送方式：</label>
									</td>
									<td>
										<div class="control-div" id="accGetm"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">开通email对账单：</label>
									</td>
									<td>
										<div class="control-div" id="emlAddrf"></div>
									</td>
									<td align="right" class="stmtEmail" style="display: none;">
										<label class="control-label np">对帐单EMAIL：</label>
									</td>
									<td colspan="3" class="stmtEmail" style="display: none;">
										<div class="control-div" id="stmtEmail"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">主卡开通余额变动提醒：</label>
									</td>
									<td >
										<div class="control-div" id="machgf"></div>
									</td>
									<td align="right" class="machgMobile" style="display: none;">
										<label class="control-label np">主卡余额提醒发送手机号码：</label>
									</td>
									<td colspan="3" class="machgMobile" style="display: none;">
										<div class="control-div" id="machgMobile"></div>
									</td>
								</tr>
							</table>
						</div>
					</form>	
				</ul>
				<ul class="ul-style">
						<div class="business-man">基本信息</div>
						<div class="business-padding">
							<table cellpadding="0" cellspacing="0" border="0" class="infor-table">
								<tr>	
									<td align="right">
										<label class="control-label np">证件类型：</label>
									</td>
									<td>
										<div class="control-div" id="custSort"></div>
									</td>
									
									<td align="right">
										<label class="control-label np">身份证号码：</label>
									</td>
									<td>
										<div class="control-div" id="custCode"></div>
									</td>
									<td align="right">
										<label class="control-label np">出生日期：</label>
									</td>
									<td>
										<div class="control-div" id="birthDate"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">证件有效期：</label>
									</td>
									<td>
										<div class="control-div" id="statDate"></div>
									</td>
									<td align="right">
										<label class="control-label np">姓名：</label>
									</td>
									<td>
										<div class="control-div" id="chnsName"></div>
									</td>
									<td align="right">
										<label class="control-label np">英文/拼音：</label>
									</td>
									<td>
										<div class="control-div" id="engName"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">婚否：</label>
									</td>
									<td>
										<div class="control-div" id="mrtlstat"></div>
									</td>
									
									<td align="right">
										<label class="control-label np">教育程度：</label>
									</td>
									<td>
										<div class="control-div" id="eduLvl"></div>
									</td>
									<td align="right">
										<label class="control-label np">手机号1：</label>
									</td>
									<td>
										<div class="control-div" id="mvblNo"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">住宅状况：</label>
									</td>
									<td>
										<div class="control-div" id="homeStat"></div>
									</td>
									<td align="right">
										<label class="control-label np">住宅邮编：</label>
									</td>
									<td>
										<div class="control-div" id="homeZip"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">住宅地址：</label>
									</td>
									<td colspan="3">
										<div class="control-div" id="liveAddr"></div>
									</td>
									<td align="right">
										<label class="control-label np">何时入住现址：</label>
									</td>
									<td>
										<div class="control-div" id="inDate"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">通讯地址：</label>
									</td>
									<td colspan="3">
										<div class="control-div" id="commaddra"></div>
									</td>
									<td align="right">
										<label class="control-label np">通讯地址邮编：</label>
									</td>
									<td>
										<div class="control-div" id="commaZip"></div>
									</td>
								</tr>
							</table>
						</div>
				</ul>
				<ul class="ul-style">
						<div class="business-man">在职情况</div>
						<div class="business-padding">
							<table cellpadding="0" cellspacing="0" border="0" class="infor-table">
								<tr>	
									<td align="right">
										<label class="control-label np">单位名称：</label>
									</td>
									<td colspan="3">
										<div class="control-div" id="company"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">进入单位时间：</label>
									</td>
									<td>
										<div class="control-div" id="joinDate"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">单位地址：</label>
									</td>
									<td colspan="3">
										<div class="control-div" id="caddressa"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">单位邮编：</label>
									</td>
									<td>
										<div class="control-div" id="corpZip"></div>
									</td>
									<td align="right">
										<label class="control-label np">单位性质：</label>
									</td>
									<td>
										<div class="control-div" id="modelCode"></div>
									</td>
								</tr>
								
								<tr>	
									<td align="right">
										<label class="control-label np">单位电话：</label>
									</td>
									<td>
										<div class="control-div" id="coPhoneNo"></div>
									</td>
									<td align="right">
										<label class="control-label np">职务：</label>
									</td>
									<td>
										<div class="control-div" id="occptn"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">年收入：</label>
									</td>
									<td>
										<div class="control-div" id="yearIncome"></div>
									</td>
								</tr>
							</table>	
						</div>
				</ul>
				<ul class="ul-style">
						<div class="business-man">基本信息</div>
						<div class="business-padding">
							<table cellpadding="0" cellspacing="0" border="0" class="infor-table">
								<tr>	
									<td align="right">
										<label class="control-label np">紧急联络人1：</label>
									</td>
									<td>
										<div class="control-div np" id="reltname1"></div>
									</td>
									<td align="right">
										<label class="control-label np">手机号1：</label>
									</td>
									<td>
										<div class="control-div np" id="reltmobl1"></div>
									</td>
									
									<td align="right">
										<label class="control-label np">关系：</label>
									</td>
									<td>
										<div class="control-div np" id="reltship1"></div>
									</td>
									<td align="right">
										<label class="control-label np">性别：</label>
									</td>
									<td>
										<div class="control-div" id="reltsex1"></div>
									</td>
								</tr>
								<tr>	
									<td align="right">
										<label class="control-label np">紧急联络人2：</label>
									</td>
									<td>
										<div class="control-div np" id="reltname2" ></div>
									</td>
									<td align="right">
										<label class="control-label np">手机号1：</label>
									</td>
									<td>
										<div class="control-div np" id="reltmobl2"></div>
									</td>
									
									<td align="right">
										<label class="control-label np">关系：</label>
									</td>
									<td>
										<div class="control-div np" id="reltship2"></div>
									</td>
									<td align="right">
										<label class="control-label np">性别：</label>
									</td>
									<td>
										<div class="control-div np" id="reltsex2"></div>
									</td>
								</tr>
							</table>
						</div>
				</ul>
				<ul class="ul-style">
						<div class="business-man">其他信息</div>
						<div class="business-padding">
							<table cellpadding="0" cellspacing="0" border="0" class="infor-table">
								<tr>	
									<td align="right">
										<label class="control-label np">转出卡号/帐号1：</label>
									</td>
									<td>
										<div class="control-div" id="outCardno1"></div>
									</td>
									<td align="right">
										<label class="control-label np">提前还款天数：</label>
									</td>
									<td>
										<div class="control-div" id="payDays"></div>
									</td>
								</tr>
							</table>
						</div>	
				</ul>
				<ul class="ul-style">
					<div class="business-man">贷款信息</div>
					<div class="business-padding">
						<table cellpadding="0" cellspacing="0" border="0" class="infor-table">
							<tr>	
								<td align="right">
									<label class="control-label np">申请分期金额：</label>
								</td>
								<td>
									<div class="control-div" id="loanAmount"></div>
								</td>
								<td align="right">
									<label class="control-label np">贷款期限(月)：</label>
								</td>
								<td>
									<div class="control-div" id="loanMonth"></div>
								</td>
							</tr>
							<tr>	
								<td align="right">
									<label class="control-label np">手续费率：</label>
								</td>
								<td>
									<div class="control-div" id="bankRate"></div>
								</td>
								<td align="right">
									<label class="control-label np">手续费：</label>
								</td>
								<td>
									<div class="control-div" id="stagesFee"></div>
								</td>
							</tr>
							<tr>	
								<td align="right">
									<label class="control-label np">购车价：</label>
								</td>
								<td>
									<div class="control-div" id="carPrice"></div>
								</td>
							</tr>
						</table>
					</div>	
				</ul>
				
				<div class="business-manwife">开卡附件资料</div>
    			<div class="business-padding">
    				<div class="zx-addimg">
	         			<ul id='HZ_YIN_HANG_KAIKA_ZILIAO'></ul>
	         		</div>
	         	</div>	
	         		
				<div class="business-manwife">开卡预受理</div>
    			<div class="padding-nono">
					<table cellpadding="0" cellspacing="0" border="0" class="buyinfor-table">
						<tr>
							<td align="right"><label class="control-label np">开卡预受理：</label>
							</td>
							<td><input id="opencardTime" name="operateTime" class="laydate-icon form-control" onclick="laydate()" placeholder="经办时间(必填)"/></td>
							<td align="right">
								&nbsp;&nbsp;&nbsp;<button type="button" class="dpbtn dpbtn_blue" onclick="allocation();">提交</button>
							</td>
						</tr>
					</table>
				</div>
	         	
				<div class="business-manwife">经办信息</div>
				<div class="padding-nono">
					<table cellpadding="0" cellspacing="0" border="0"
						class="buyinfor-table">
						<tr>
							<td align="right"><label class="control-label np">经办人：</label>
							</td>
							<td><input class="form-control" type="text" id="operate" name="" readonly="readonly" value="${current_user_key.uname}" />
							</td>
							<td align="right"><label class="control-label np">经办时间：</label>
							</td>
							<td><input id="operateTime" name="operateTime" class="form-control" onclick="laydate()" placeholder="经办时间" readonly="readonly"/></td>
						</tr>
					</table>
				</div>
		</div>
		
		<%@include file="/jsp/comm_js_include.jsp"%>
		<%@include file="/jsp/common_fileupload_multi_include.jsp"%>
		<script src="${basePath}/js/plugins/layer/laydate/laydate.js"></script>
		<script type="text/javascript">
		    $(function(){	
		    	//选项卡
		    	var $lib = $('#tabb>li');
				var $ulb = $('#contentb .ul-style');
		        $lib.click(function(){
					var $this = $(this);
					var $t = $this.index();
					$lib.removeClass();
					$this.addClass('currentb');
					$ulb.css('display','none');
					$ulb.eq($t).css('display','block');
				});
		        getData();
		        
		        var busiId = $.getUrlData("busiId");
		    	showAttentment(busiId, null, '${modeIDTypeNames.SQKK }');
			});	
		    
		    function getData(){
		 		var data={};
	 	 		data.busiId=$.getUrlData("busiId");
		 		$.dpAjax({
	    			show:false,
	    			url:'${basePath}/YwOpenCardHzicbcSubController/list',
		    		data: data,
	    			success: function(datas){
	    				var result = datas.result.rows[0];
    					if(result && result != ""){
    						if(result.openCardStatus != 100){
		    					$(".buttonfixed").show();
		    				}
		    				$("#openCardSubId").val(result.replaceId);
    						$("#openCardId").val(result.openCardId);
		    				$("#authref").text(result.authref);
		    				$("#maMobile").text(result.mamobile);
		    				$("#smsPhone").text(result.smsphone);
		    				$("#drawMode").text(result.drawmodeDisplay);
		    				$("#accGetm").text(result.accgetmDisplay);
		    				$("#emlAddrf").text(result.emladdrfDisplay);
		    				if(result.emladdrf == "1"){
		    					$(".stmtEmail").show();
		    				}
		    				$("#stmtEmail").text(result.stmtemail);
		    				$("#machgf").text(result.machgfDisplay);
		    				if(result.machgf == "1"){
		    					$(".machgMobile").show();
		    				}
		    				$("#machgMobile").text(result.machgmobile);
		    				$("#custSort").text("身份证");
		    				$("#custCode").text(result.custcode);
		    				$("#birthDate").text(result.birthdate);
		    				$("#sex").text(result.sexDisplay);
		    				$("#mrtlstat").text(result.mrtlstatDisplay);
		    				$("#eduLvl").text(result.edulvlDisplay);
		    				$("#chnsName").text(result.chnsname);
		    				$("#engName").text(result.engname);
		    				$("#mvblNo").text(result.mvblno);
		    				$("#statDate").text(result.statdate);
		    				$("#homeStat").text(result.homestatDisplay);
		    				$("#homeZip").text(result.homezip);
		    				var hprovince = result.hprovince;
		    				var hcity = result.hcity;
		    				var hcounty = result.hcounty;
		    				var haddress = result.haddress;
		    				$("#liveAddr").text(hprovince+hcity+hcounty+haddress);
		    				$("#inDate").text(result.indate);
		    				var commprov = result.commprov;
		    				var commcity = result.commcity;
		    				var commcounty = result.commcounty;
		    				var commaddr = result.commaddr;
		    				$("#commaddra").text(commprov+commcity+commcounty+commaddr);
		    				$("#commaZip").text(result.commazip);
		    				$("#joinDate").text(result.joindate);
		    				var cprovince = result.cprovince;
		    				var ccity = result.ccity;
		    				var ccounty = result.ccounty;
		    				var caddress = result.caddress;
		    				$("#caddressa").text(cprovince+ccity+ccounty+caddress);
		    				$("#corpZip").text(result.corpzip);
		    				$("#modelCode").text(result.modelcodeDisplay);
		    				$("#coPhoneNo").text(result.cophoneno);
		    				$("#occptn").text(result.occptnDisplay);
		    				$("#yearIncome").text(result.yearincome);
		    				$("#outCardno1").text(result.outcardno1);
		    				$("#payDays").text(result.paydays);
		    				$("#company").text(result.ccol1);
		    				if(result.reltsex1 =='1'){
		    					$("#reltsex1").text('男');
		    				}else{
		    					$("#reltsex1").text('女');
		    				}
		    				if(result.reltsex2 =='1'){
		    					$("#reltsex2").text('男');
		    				}else{
		    					$("#reltsex2").text('女');
		    				}
		    				$("#operate").val(result.creatorName);
		    				$("#operateTime").val(formateIntegerDate(result.created));
		    				
		    			   $("#reltname1").text(result.reltname1);
			          	   $("#reltmobl1").text(result.reltmobl1);
			          	   $("#reltname2").text(result.reltname2);
			          	   $("#reltmobl2").text(result.reltmobl2);
			          	   $("#reltship1").text(result.reltship1Display);
			          	   $("#reltship2").text(result.reltship2Display);
	    				}
	                 }
		    	});
		 	}
		    
		    
		    var allocation = function(){
		    	var data={};
	    		data.busiId=$.getUrlData("busiId");
	    		if($("#openCardSubId").val()!=""){
		    		data.id=$("#openCardSubId").val();
		    	}
		    	data.cusId=$.getUrlData("cusId");
		    	data.openCardId=$("#openCardId").val();
		    	
		    	data.openCardId=$("#opencardTime").val();//卡开预受理
		    	
		    	if($("#opencardTime").val() == ""){
		    		layer.tips('必填', '#opencardTime',{tips: 2});
		    		return;
		    	}
		    	
		    	layer.confirm('您确认要提交吗？', {
		  		  btn: ['确定','取消'] //按钮
		  		},function(){
		  			layer.closeAll();
			    	$.dpAjax({
			    		url:'',
			    		data:data,
		    			success: function(datas){
		    				layer.msg('执行成功！', {icon: 6});
		    				setTimeout(function () {
					 			window.location.href = "${basePath}/web/system/yw/autoOpenCardYDealList.jsp";
					 		}, 3000);
							return;
		                 }
			    	});
		  		})	
		    }
    </script>
</body>
</html>
